package operation;

import com.supermap.desktop.core.Application;
import com.supermap.desktop.core.Interface.IForm;
import com.supermap.desktop.core.Interface.IFormTabular;

import javax.swing.*;
import java.awt.*;

/**
 * Created by hanyz on 2017/3/30.
 */
public class TabularOperation extends Operation {
	public JTable table;

	public JTable getTable() {
		return table;
	}

	public void setTable(JTable table) {
		this.table = table;
	}

	public TabularOperation(){
		IForm activeForm = Application.getActiveApplication().getActiveForm();
		if (activeForm instanceof IFormTabular) {
			container  = (Container) activeForm;
			table = ((IFormTabular) Application.getActiveApplication().getActiveForm()).getjTableTabular();
		}
	}

	public TableOperation getTableOperation(){
		if(table != null){
			return new TableOperation(table);
		}
		return null;
	}
}
